<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
  <head>
    <th:block th:replace="~{/_include/header}" />
    <title>[[${bundle.L('添加字段')}]]</title>
    <style>
      .select2-container--default .select2-results > .select2-results__options {
        max-height: 151px;
      }
    </style>
  </head>
  <body class="dialog">
    <div class="main-content">
      <form>
        <div class="form-group row">
          <label class="col-sm-3 col-form-label text-sm-right">[[${bundle.L('字段名称')}]]</label>
          <div class="col-sm-7">
            <input class="form-control form-control-sm" type="text" id="fieldLabel" maxlength="40" />
          </div>
        </div>
        <div class="form-group row">
          <label class="col-sm-3 col-form-label text-sm-right">[[${bundle.L('字段类型')}]]</label>
          <div class="col-sm-7">
            <select class="form-control form-control-sm" id="type"></select>
          </div>
        </div>
        <div class="form-group row hide J_dt-REFERENCE J_dt-N2NREFERENCE">
          <label class="col-sm-3 col-form-label text-sm-right">[[${bundle.L('选择引用实体')}]]</label>
          <div class="col-sm-7">
            <select class="form-control form-control-sm" id="refEntity"></select>
          </div>
        </div>
        <div class="form-group row hide J_dt-CLASSIFICATION">
          <label class="col-sm-3 col-form-label text-sm-right">[[${bundle.L('选择分类数据')}]]</label>
          <div class="col-sm-7">
            <select class="form-control form-control-sm" id="refClassification"></select>
          </div>
        </div>
        <div class="form-group row hide J_dt-STATE">
          <label class="col-sm-3 col-form-label text-sm-right">[[${bundle.L('状态类 (StateSpec)')}]]</label>
          <div class="col-sm-7">
            <input class="form-control form-control-sm" type="text" id="stateClass" placeholder="com.rebuild.core.support.state.HowtoState" />
          </div>
        </div>
        <div class="form-group row">
          <label class="col-sm-3 col-form-label text-sm-right">[[${bundle.L('备注')}]]</label>
          <div class="col-sm-7">
            <textarea class="form-control form-control-sm row2x" id="comments" maxlength="100" th:placeholder="${bundle.L('(选填)')}"></textarea>
          </div>
        </div>
        <div class="form-group row pb-1">
          <label class="col-sm-3 col-form-label text-sm-right"></label>
          <div class="col-sm-7">
            <label class="custom-control custom-control-sm custom-checkbox custom-control-inline mb-0">
              <input class="custom-control-input" type="checkbox" id="saveAndNew" />
              <span class="custom-control-label">[[${bundle.L('继续添加下一个')}]]</span>
            </label>
          </div>
        </div>
        <div class="form-group row footer">
          <div class="col-sm-7 offset-sm-3">
            <button class="btn btn-primary" type="button">[[${bundle.L('确定')}]]</button>
            <button class="btn btn-link" type="button" onclick="parent.RbModal.hide()">[[${bundle.L('取消')}]]</button>
          </div>
        </div>
      </form>
    </div>
    <th:block th:replace="~{/_include/footer}" />
    <script th:src="@{/assets/js/metadata/field-type.js}" type="text/babel"></script>
    <script th:src="@{/assets/js/metadata/field-new.js}" type="text/babel"></script>
  </body>
</html>
